Tag Link | [File->SetPosition] | Category | File |
---|---|---|---|
Type | Member | Source Available | Yes |
Support | Preferred | Version | 7.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | File |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0 |
Sets the position of the files read/write marker. Requires an integer line or character position (depending on the read mode) as a parameter. All subsequent reads and writes will occur at the given position.
[File Variable->(SetPosition: Integer)]
Required Parameters | |
---|---|
Integer | The line number or character position number (depending on read mode). |
To read characters from a file starting at a specified position:
Characters can be read starting at a set position using the [File->SetPosition] tag before the [File->Read] tag. The example below reads 240 characters starting at character number 16.
[Var:'File'=(File: 'myfile.txt', File_OpenRead, File_ModeChar)]
[$File->(SetPosition: 16)]
[$File->(Read: 240)][$File->Close]
Substitution | ||
---|---|---|
|
|
|